<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">


<ui:composition template="/template.xhtml">
	 
	<ui:define name="content">
	    <h:form>
	    <f:loadBundle basename="resources.crearPost" var="msg"/>

	    <h5 class="title" align="right">
	    <h:commandButton value="#{msg.function}" action="/funcionesUsuario.xhtml"/>
	    <h:commandButton value="#{msg.cerrar}" action="#{usuarioBackBeenSesion.cerrarSesion}"/>
	    </h5>	    		    	
	    <p/>
	    
	    <center>  
        <rich:panel style="color:blue">	
					<f:facet name="header" >
				      <h:outputText value="#{postBackBeen.titulo}" /> 
				    </f:facet>
              <h:panelGrid columns="1">            
		           <h:inputTextarea value="#{postBackBeen.contenido}" disabled="true"  />		           
              </h:panelGrid>
		</rich:panel>
        </center>
        
        
       		 <h5 class="title" align="right">
			   <h:outputText value="FUENTE: #{postBackBeen.fuente}"/>
		     </h5>
		     
		     
             <h5 class="title" align="left">
              	<h:panelGrid columns="3"> 
	    			<h:outputText value="#{msg.gusta}: #{postBackBeen.gusta}"/>
	    			<h:outputText value="#{msg.noGusta}: #{postBackBeen.noGusta}"/>
	    			<h:outputText value="#{msg.visitas}: #{postBackBeen.visitas}"/>
	    			<h:commandButton value="#{msg.gusta}" action="#{postBackBeen.gusta}"/>	    			
	    			<h:commandButton value="#{msg.noGusta}" action="#{postBackBeen.noGustar}"/>
	    			
	    		</h:panelGrid>
		      </h5>	
		       
		      
		  <center>
		  		<rich:panel  style="color:blue" >
		  		<f:facet name="header" >
			      <h:outputText value="COMENTARIOS"/>
			    </f:facet>
			    
			    
		  	   <h:dataTable  value="#{postBackBeen.lista}" var="c">
				  <h:column>
				    <h:outputText value="#{c.usuario.apodo}"/>
				  </h:column>    
				  <h:column>
				    <h:inputTextarea value="#{c.comentario}"/>
				  </h:column>                      
				</h:dataTable>   
				
				<p/>
				<h3><h:outputText value="#{msg.opinion}" /> </h3>
			    <P/>
			    
				<h:panelGrid columns="2">   
				         
		            <h:outputText  value="comentario" />
		           <h:inputTextarea value="#{postBackBeen.comentario}"/>
		           <h:outputText  value="USUARIO" />
		           <h:inputText value="#{postBackBeen.apodo}"/>
		           <h:outputText  value="CONTRASEÑA" />
		           <h:inputSecret value="#{postBackBeen.contraseña}"/>
		           
                </h:panelGrid>
				<a4j:commandButton value="ACEPTAR" action="#{postBackBeen.comentar}"/>
				</rich:panel>
				
				
		  </center> 
		  
		     
		  
	    </h:form>
	</ui:define>
	
</ui:composition>
</html>